﻿using System;
using SharpSqlAnalyzer.nodes;
using SharpSqlAnalyzer.nodes.hive;

namespace SharpSqlAnalyzer.stmt.hive
{
	// Token: 0x020001B9 RID: 441
	public class THiveDropDatabase : TCustomSqlStatement
	{
		// Token: 0x06000EB4 RID: 3764 RVA: 0x0030A664 File Offset: 0x00308864
		public THiveDropDatabase(EDbVendor dbvendor) : base(dbvendor)
		{
			this.sqlstatementtype = ESqlStatementType.ssthiveDropDatabase;
		}

		// Token: 0x170002AC RID: 684
		// (get) Token: 0x06000EB5 RID: 3765 RVA: 0x0030A678 File Offset: 0x00308878
		public virtual TSourceToken DatabaseToken
		{
			get
			{
				return this.databaseToken;
			}
		}

		// Token: 0x170002AD RID: 685
		// (get) Token: 0x06000EB6 RID: 3766 RVA: 0x0030A680 File Offset: 0x00308880
		// (set) Token: 0x06000EB7 RID: 3767 RVA: 0x0030A688 File Offset: 0x00308888
		public virtual TObjectName DbName
		{
			get
			{
				return this.dbName;
			}
			set
			{
				this.dbName = value;
			}
		}

		// Token: 0x170002AE RID: 686
		// (get) Token: 0x06000EB8 RID: 3768 RVA: 0x0030A691 File Offset: 0x00308891
		// (set) Token: 0x06000EB9 RID: 3769 RVA: 0x0030A699 File Offset: 0x00308899
		public virtual bool IfExists
		{
			get
			{
				return this.ifExists;
			}
			set
			{
				this.ifExists = value;
			}
		}

		// Token: 0x170002AF RID: 687
		// (get) Token: 0x06000EBA RID: 3770 RVA: 0x0030A6A2 File Offset: 0x003088A2
		public virtual TSourceToken RestrictCascadeToken
		{
			get
			{
				return this.restrictCascadeToken;
			}
		}

		// Token: 0x06000EBB RID: 3771 RVA: 0x0030A6AC File Offset: 0x003088AC
		public override int doParseStatement(TCustomSqlStatement psql)
		{
			if (this.rootNode == null)
			{
				return -1;
			}
			base.doParseStatement(psql);
			THiveDropDBSqlNode thiveDropDBSqlNode = (THiveDropDBSqlNode)this.rootNode;
			this.dbName = thiveDropDBSqlNode.DbName;
			this.ifExists = thiveDropDBSqlNode.IfExists;
			this.databaseToken = thiveDropDBSqlNode.DatabaseToken;
			this.restrictCascadeToken = thiveDropDBSqlNode.RestrictCascadeToken;
			return 0;
		}

		// Token: 0x06000EBC RID: 3772 RVA: 0x0030A708 File Offset: 0x00308908
		public override void accept(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x06000EBD RID: 3773 RVA: 0x0030A718 File Offset: 0x00308918
		public override void acceptChildren(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x0400133E RID: 4926
		private TObjectName dbName;

		// Token: 0x0400133F RID: 4927
		private TSourceToken databaseToken;

		// Token: 0x04001340 RID: 4928
		private bool ifExists;

		// Token: 0x04001341 RID: 4929
		private TSourceToken restrictCascadeToken;
	}
}
